package com.yc.cloud.admin.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 监视点响应VO
 *
 * @author Claude Code
 * @since 2025-09-29
 */
@Data
@Schema(description = "监视点响应对象")
public class HwMonitoringPointVo {

    @Schema(description = "监视点ID")
    private Long id;

    @Schema(description = "监视点名称")
    private String name;

    @Schema(description = "监视点编码")
    private String code;

    @Schema(description = "所属区域ID")
    private Long regionId;

    @Schema(description = "所属区域名称")
    private String regionName;

    @Schema(description = "详细地址")
    private String detailedAddress;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "纬度")
    private BigDecimal latitude;

    @Schema(description = "监视点类型：1-重点区域, 2-一般区域, 3-出入口, 4-边界线")
    private Integer pointType;

    @Schema(description = "监视点类型名称")
    private String pointTypeName;

    @Schema(description = "重要程度：1-高, 2-中, 3-低")
    private Integer importanceLevel;

    @Schema(description = "重要程度名称")
    private String importanceLevelName;

    @Schema(description = "状态：1-启用, 0-禁用")
    private Integer status;

    @Schema(description = "状态名称")
    private String statusName;

    @Schema(description = "描述信息")
    private String description;

    @Schema(description = "联系人")
    private String contactPerson;

    @Schema(description = "联系电话")
    private String contactPhone;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建者ID")
    private Long createBy;

    @Schema(description = "更新者ID")
    private Long updateBy;

    // 获取监视点类型名称
    public String getPointTypeName() {
        if (pointType == null) {
            return null;
        }
        return switch (pointType) {
            case 1 -> "重点区域";
            case 2 -> "一般区域";
            case 3 -> "出入口";
            case 4 -> "边界线";
            default -> "未知";
        };
    }

    // 获取重要程度名称
    public String getImportanceLevelName() {
        if (importanceLevel == null) {
            return null;
        }
        return switch (importanceLevel) {
            case 1 -> "高";
            case 2 -> "中";
            case 3 -> "低";
            default -> "未知";
        };
    }

    // 获取状态名称
    public String getStatusName() {
        if (status == null) {
            return null;
        }
        return switch (status) {
            case 1 -> "启用";
            case 0 -> "禁用";
            default -> "未知";
        };
    }
}